
import http from "@/utils/http";
import type { BannerItem, CategoryItem, HotItem, PageParams, PageResult } from '@/types/home'
// 请求轮播图数据
export const getHomeBanner = (distributionSite: number = 1) => {
    return http<BannerItem[]>({
        method: 'GET',
        url: `/home/banner?distributionSite=${distributionSite}`
    })
}


//  请求分类数据
export const getCategory = () => {
    return http<CategoryItem[]>({
        method: 'GET',
        url: `/home/category/mutli`
    })
}


// 请求热门推荐数据
export const getHot = () => {
    return http<HotItem[]>({
        method: 'GET',
        url: `/home/hot/mutli`
    })
}


// 请求猜你喜欢数据
export const getguessLike = (params?: PageParams) => {
    return http<PageResult>({
        method: 'GET',
        url: `/home/goods/guessLike`,
        data: params
    })
}
